Solving the TTC 2011 Compiler Optimization Case with GReTL

نویسنده

  • Tassilo Horn
چکیده

GReTL (Graph Repository Transformation Language, [5]) is the operational transformation language of the TGraph technological space [2]. Models are represented as typed, directed, ordered, and attributed graphs. GReTL uses the GReQL (Graph Repository Query Language, [3]) for its matching part. The standard GReTL operations are currently targeted at out-place transformation which create the target metamodel and the target graph simultaneously, but this case requires changing the graph in-place. Luckily, GReTL is designed as an extensible language. Adding custom operations requires only specializing one framework class, overriding one method that implements the operation’s behavior, and implementing another factory method that is responsible for creating an instance of the new operation initialized with the given parameters. Consequently, some in-place operations have been added to the language. There is one operation MatchReplace which is similar to a rule in graph replacement systems. There is an operation Delete for deleting elements, an operation MergeVertices for merging a set of duplicate vertices into one canonical representative, and a higher-order operation Iteratively which receives another operation and applies it as long as possible. The implementation of the most complex one, MatchReplace, is about 380 lines of Java code including comments and empty lines, the other three operations are at most 80 lines or less. Thus, this case was solved using a mixed bottom-up and top-down approach: the language was extended with three new operations, and then these operations were used to write the transformations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Saying Hello World with GReTL - A Solution to the TTC 2011 Instructive Case

GReTL (Graph Repository Transformation Language, [6]) is the operational transformation language of the TGraph technological space [2]. Models are represented as typed, directed, ordered, and attributed graphs. There are import/export tools for EMF models and metamodels. GReTL is designed as a Java API, but a simle concrete syntax is provided as well. The elementary GReTL transformation operati...

متن کامل

Solving the TTC 2011 Compiler Optimization Case with QVTR-XSLT

In this short paper we present our solution for the Compiler Optimization case study [1] of the Transformation Tool Contest (TTC) 2011 using the QVTR-XSLT tool [2]. The tool supports editing and execution of the graphical notation of QVT Relations language [6]. The case study addresses the problem of optimizing the intermediate representation of compiled program code. This problem consists of t...

متن کامل

Solving the TTC 2011 Compiler Optimization Case with GROOVE

GROOVE1 [2] is a general purpose graph transformation tool set that uses simple labelled graphs. The core functionality of GROOVE is to recursively apply all rules from a predefined set (the graph production system – GPS) to a given start graph, and to all graphs generated by such applications. This results in a state space consisting of the generated graphs. The main component of the GROOVE to...

متن کامل

Solving the TTC 2011 Compiler Optimization Task with metatools

The authors’ meta tools are a collection of tools for generic programming. This includes generating Java sources from mathematically well-founded specifications, as well as the creation of strictly typed document object models for XML encoded texts. In this context, almost every computer-internal structure is treated as a “model”, and every computation is a kind of model transformation. This co...

متن کامل

Solving the TTC 2011 Compiler Optimization Case with GrGen.NET

The challenge of the Compiler Optimization Case [2] is to perform local optimizations and instruction selection on the graph-based intermediate representation of a compiler. The case is designed to compare participating tools regarding their performance. We tackle this task employing the general purpose graph rewrite system GRGEN.NET (www.grgen.net). GRGEN.NET is an application domain neutral g...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011